package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.com.api.entity.ApiT_member;

//DAO
public interface T_memberMapperBase {

	// 根据id查看
	@Select("SELECT * FROM t_member  WHERE c_id = #{c_id}")
	public ApiT_member findT_memberById(Integer c_id);

	// 查看数据集
	@Select("SELECT * FROM T_member")
	public List<ApiT_member> findT_members();

	// 添加
	// @Insert("INSERT INTO t_member (c_userid, c_pass, c_wt, c_da, c_nick, c_tname, c_city, c_area, c_quan, c_mob, c_mail, c_qq, c_sex, c_ip, c_regdate, c_logdate, c_jf, c_avatar, c_cname, c_faren, c_license, c_pname, c_address, c_zip, c_tel, c_fax, c_mtype, c_invite, t_card, c_money, token, c_age, c_birthday, c_thirdtype, c_thirdtoken, openid, devicetype, deviceid, CITY_ID, SHOP_ID, QQ_OPENID, SINA_OPENID, INVITE_CODE, PAY_PWD, SM_CODE, COMPANY_TITLE, PROFESSION_TITLE, VERIFY_ENTREPRENEUR, VERIFY_IDCARD, VERIFY_PARTNER, PARTNER_CODE, VERIFY_MEDIA, REFEREE_UID, PROVINCE_ID, PROVINCE, WX_NAME, QQ_NAME, WB_NAME, LONGITUDE, LATITUDE, VERIFY_MOBILE, SM_CODE_DISABLE,frozen_money,referee_type,referee_deadline,is_take) "
	// +
	// "VALUES ( #{c_userid}, #{c_pass}, #{c_wt}, #{c_da}, #{c_nick}, #{c_tname}, #{c_city}, #{c_area}, #{c_quan}, #{c_mob}, #{c_mail}, #{c_qq}, #{c_sex}, #{c_ip}, #{c_regdate}, #{c_logdate}, #{c_jf}, #{c_avatar}, #{c_cname}, #{c_faren}, #{c_license}, #{c_pname}, #{c_address}, #{c_zip}, #{c_tel}, #{c_fax}, #{c_mtype}, #{c_invite}, #{t_card}, #{c_money}, #{token}, #{c_age}, #{c_birthday}, #{c_thirdtype}, #{c_thirdtoken}, #{openid}, #{devicetype}, #{deviceid}, #{CITY_ID} , #{SHOP_ID} , #{QQ_OPENID} , #{SINA_OPENID} , #{INVITE_CODE} , #{PAY_PWD} , #{SM_CODE} , #{COMPANY_TITLE} , #{PROFESSION_TITLE} , #{VERIFY_ENTREPRENEUR} , #{VERIFY_IDCARD} , #{VERIFY_PARTNER} , #{PARTNER_CODE} , #{VERIFY_MEDIA} , #{REFEREE_UID} , #{PROVINCE_ID} , #{PROVINCE} , #{WX_NAME} , #{QQ_NAME} ,  #{WB_NAME} ,  #{LONGITUDE} ,  #{LATITUDE} ,  #{VERIFY_MOBILE}, #{sm_code_disable},#{frozen_money})")
	// @Options(useGeneratedKeys = true, keyProperty = "c_id")
	public int insertT_member(ApiT_member t_member);

	// 修改
	@Update("UPDATE t_member SET c_userid = #{c_userid,jdbcType=VARCHAR}, c_pass = #{c_pass,jdbcType=VARCHAR}, c_wt = #{c_wt,jdbcType=VARCHAR}, "
			+ "	c_da = #{c_da,jdbcType=VARCHAR}, c_nick = #{c_nick,jdbcType=VARCHAR}, c_tname = #{c_tname,jdbcType=VARCHAR}, "
			+ "c_city = #{c_city,jdbcType=VARCHAR}, c_area = #{c_area,jdbcType=VARCHAR}, c_quan = #{c_quan,jdbcType=VARCHAR}, "
			+ "c_mob = #{c_mob,jdbcType=VARCHAR}, c_mail = #{c_mail,jdbcType=VARCHAR}, c_qq = #{c_qq,jdbcType=VARCHAR},c_wx = #{c_wx,jdbcType=VARCHAR}, c_sex = #{c_sex,jdbcType=VARCHAR}, "
			+ "c_ip = #{c_ip,jdbcType=VARCHAR}, c_regdate = #{c_regdate,jdbcType=VARCHAR}, c_logdate = #{c_logdate,jdbcType=VARCHAR}, c_jf = #{c_jf,jdbcType=INTEGER}, "
			+ "c_avatar = #{c_avatar,jdbcType=VARCHAR}, c_cname = #{c_cname,jdbcType=VARCHAR}, c_faren = #{c_faren,jdbcType=VARCHAR}, c_license = #{c_license,jdbcType=VARCHAR}, "
			+ "c_pname = #{c_pname,jdbcType=VARCHAR}, c_address = #{c_address,jdbcType=VARCHAR}, c_zip = #{c_zip,jdbcType=VARCHAR}, c_tel = #{c_tel,jdbcType=VARCHAR}, "
			+ "c_fax = #{c_fax,jdbcType=VARCHAR}, c_mtype = #{c_mtype,jdbcType=INTEGER}, c_invite = #{c_invite,jdbcType=VARCHAR}, t_card = #{t_card,jdbcType=INTEGER}, "
			+ "c_money = #{c_money,jdbcType=NUMERIC}, token = #{token,jdbcType=VARCHAR}, c_age = #{c_age,jdbcType=INTEGER}, c_birthday = #{c_birthday,jdbcType=VARCHAR}, "
			+ "c_thirdtype = #{c_thirdtype,jdbcType=INTEGER}, c_thirdtoken = #{c_thirdtoken,jdbcType=VARCHAR}, openid = #{openid,jdbcType=VARCHAR}, devicetype = #{devicetype,jdbcType=INTEGER}, "
			+ "deviceid = #{deviceid,jdbcType=VARCHAR}, city_id=#{city_id,jdbcType=VARCHAR} , shop_id=#{shop_id,jdbcType=VARCHAR}, qq_openid=#{qq_openid,jdbcType=VARCHAR} , "
			+ "sina_openid=#{sina_openid,jdbcType=VARCHAR} ,invite_code= #{invite_code,jdbcType=VARCHAR} ,pay_pwd= #{pay_pwd,jdbcType=VARCHAR} ,sm_code= #{sm_code,jdbcType=VARCHAR}, "
			+ "company_title= #{company_title,jdbcType=VARCHAR} ,profession_title= #{profession_title,jdbcType=VARCHAR} ,verify_entrepreneur= #{verify_entrepreneur,jdbcType=INTEGER}, "
			+ "verify_idcard= #{verify_idcard,jdbcType=INTEGER} ,verify_partner = #{verify_partner,jdbcType=INTEGER} ,partner_code= #{partner_code,jdbcType=VARCHAR}, "
			+ "verify_media= #{verify_media,jdbcType=INTEGER} ,referee_uid= #{referee_uid,jdbcType=VARCHAR} ,province_id= #{province_id,jdbcType=VARCHAR} ,province= #{province,jdbcType=VARCHAR},"
			+ "wx_name= #{wx_name,jdbcType=VARCHAR} ,qq_name= #{qq_name,jdbcType=VARCHAR} ,wb_name=  #{wb_name,jdbcType=VARCHAR} ,longitude=  #{longitude,jdbcType=VARCHAR} ,latitude= #{latitude,jdbcType=VARCHAR}, "
			+ "verify_mobile =  #{verify_mobile,jdbcType=VARCHAR} ,sm_code_disable = #{sm_code_disable,jdbcType=INTEGER},frozen_money = #{frozen_money,jdbcType=NUMERIC}, "
			+ "back_ground= #{back_ground,jdbcType=VARCHAR} ,dynamic_image= #{dynamic_image,jdbcType=VARCHAR},is_take= #{is_take,jdbcType=INTEGER},c_code= #{c_code,jdbcType=VARCHAR}"
			+ ",c_invitecode= #{c_invitecode,jdbcType=VARCHAR},c_authcode= #{c_authcode,jdbcType=VARCHAR},c_proxyid= #{c_proxyid,jdbcType=INTEGER},is_allow= #{is_allow,jdbcType=INTEGER},c_superior= #{c_superior,jdbcType=VARCHAR},c_membercode= #{c_membercode,jdbcType=VARCHAR} WHERE c_id = #{c_id}")
	public int updateT_member(ApiT_member t_member);

	// 删除
	@Delete("DELETE FROM t_member  WHERE c_id = #{c_id}")
	public int deleteT_member(Integer c_id);

}
